<?php
/**
 * Created by PhpStorm.
 * User: weixiangang
 * Date: 2019/3/18
 * Time: 8:03 PM
 */

namespace Lib\Paas;

use Lib\Base\HttpRequest;

class Role extends Base
{

    public function __construct()
    {
        parent::__construct('gameattr.roleinfo');
    }

    public function getRoleInfo(){
        if (ENVIRONMENT === 'NON_OA') {
            return array(
                "role" => "409",
                "roleName" => "操作人员"
            );
        } else {
            return array(
                "role"=>"409",
                "roleName" => "操作人员"
            );
//            $login = new Login();
//            if ($login->checkLogin()){
//                $loginInfo = $login->getLoginInfo();
//                $url = AUTH_URL.'&user_name='.$loginInfo['name'];
//                $httpRequest = new HttpRequest();
//                $resStr = $httpRequest->httpsGet($url,false,true);
//                recordAMSLog(__FILE__ . "," . __LINE__ . substr($resStr,14));
//                $result = json_decode(substr($resStr,14),true);
////            return $result;
//                $roleInfo = [];
//                recordAMSLog(__FILE__ . "," . __LINE__ . $result['ret']);
//
//                if ($result['ret'] == 1 ) {
//                    $roleInfo['role'] = $result['data']['iRoleTypeID'];
//                    $roleInfo['roleName'] = $result['data']['roleName'];
//                    return $roleInfo;
//                } else {
//                    return false;
//                }
//            }

        }
    }
}